﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Microsoft.Samples.Kinect.WpfViewers
{
    public class GMath
    {
        readonly static double eps = 1e-5;

        public static double hypot(double x, double y)
        {
            return Math.Sqrt(x * x + y * y);
        }

        public static int dcmp(double x)
        {
            return x < -eps ? -1 : x > eps ? 1 : 0;
        }
        public static bool deq(double x, double y)
        {
            return dcmp(x - y) == 0;
        }

    }
}
